package com.mapper;

import com.pojo.Parkinglot;
import com.vo.ParkingLotVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ParkinglotMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Parkinglot record);

    int insertSelective(Parkinglot record);

    Parkinglot selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Parkinglot record);

    int updateByPrimaryKey(Parkinglot record);

    List<Parkinglot> selectalllot(ParkingLotVo parkingLotVo);


    /*
    * 修改租售状态
    * */
    void updatestatebyid(@Param("id")Integer id,@Param("stateid") Integer stateid);


    /**
     *根据id查询
     */
    public Parkinglot selByid(Integer id);



    /*业主查询所有临时车位*/
    public List<Parkinglot> selectAllLinShiLot(ParkingLotVo parkingLotVo);

    /***
     * 根据车位编号将车位状态改为占用
     * @param id
     * @return
     */
    public int updateStateById(Integer id);

    /***
     * 根据编号将车位状态改为空置状态
     * @param id
     * @return
     */
    public int updateStateNullById(Integer id);

    public Parkinglot selectParkingLotById(Integer id);
}